#ifndef CONTROLBAR_H
#define CONTROLBAR_H
#include <QSlider>
#include <QPushButton>
#include <QToolButton>
#include <QWidget>
#include <QLabel>
#include <QHBoxLayout>
#include "videoplayer.h"
#include "VideoInfo.h"
#include <QTime>

#include <QStyle>
#include <QPainter>
#include <QStyleOption>

class ControlBar : public QWidget
{
    Q_OBJECT

    public:
        explicit ControlBar(QWidget *parent = 0);

    void paintEvent(QPaintEvent *);

    signals:
        void nextSong();
        void previousSong();

    public slots:
        void initNewSong(VideoInfo vid);
        void onTimeChange(int newTime);
        void resumePause();
        void updateTime(qint64);
        void volumeClicked();
        void changeVolume(int);

    private:
        QSlider* timeSlider;
        QLabel* timeLabel;
        QPushButton* StartStopButton;
        QPushButton* nextButton;
        QPushButton* previousButton;
        QSlider* volumeSlider;
        QToolButton* muteButton;
        QTime clock;
        QMediaPlayer* player;
    
};

#endif // CONTROLBAR_H
